import subprocess

def print_git_revision_num():
    info = subprocess.Popen(['git', 'show'],stdout=subprocess.PIPE)
    info_r=info.stdout.read()
    print(str(info_r).split('\\n')[0].split(' ')[1])

    info = subprocess.Popen(['git','remote','-v'], stdout=subprocess.PIPE)
    info_r = info.stdout.read()
    print(str(info_r).split('\\n')[0].split('\\t')[1])


if __name__ == '__main__':
    print_git_revision_num()